package adapter_pattern;

// 船长类，负责指挥划船
public class Captain {

    RowingBoat rowingBoat;

    // 构造函数，初始化船长和划船工具
    public Captain(RowingBoat rowingBoat) {
        System.out.print("船长在");
        this.rowingBoat = rowingBoat;
    }

    // 划船方法，调用划船工具的划船方法
    public void row() {
        rowingBoat.row();
    }
}
